export const getFileName = (path: string): string => {
  return path.split('/').pop() || path;
};

export const getFileExtension = (path: string): string => {
  const fileName = getFileName(path);
  const dotIndex = fileName.lastIndexOf('.');
  return dotIndex > -1 ? fileName.slice(dotIndex) : '';
}; 